From 610a270683cbeb62dafce25ed4cfb3414e52ca85 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 28 Jun 2005 08:09:04 +0000 Subject: [PATCH] bitkeeper revision 1.1760.1.5 (42c105a0IGE_9KbvmOfox8TMahmQVw) Only enable PGE in CR4 if the CPU supports the feature. Signed-off-by: Keir Fraser --- xen/arch/x86/setup.c | 2 +- xen/arch/x86/x86_32/mm.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 53690b8dbe..1fb131b2c8 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -87,7 +87,7 @@ struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; #if CONFIG_PAGING_LEVELS > 2 unsigned long mmu_cr4_features = X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE; #else -unsigned long mmu_cr4_features = X86_CR4_PSE | X86_CR4_PGE; +unsigned long mmu_cr4_features = X86_CR4_PSE; #endif EXPORT_SYMBOL(mmu_cr4_features); diff --git a/xen/arch/x86/x86_32/mm.c b/xen/arch/x86/x86_32/mm.c index b388c1cc49..691db03bdb 100644 --- a/xen/arch/x86/x86_32/mm.c +++ b/xen/arch/x86/x86_32/mm.c @@ -80,6 +80,7 @@ void __init paging_init(void) if ( cpu_has_pge ) { /* Suitable Xen mapping can be GLOBAL. */ + set_in_cr4(X86_CR4_PGE); PAGE_HYPERVISOR |= _PAGE_GLOBAL; PAGE_HYPERVISOR_NOCACHE |= _PAGE_GLOBAL; /* Transform early mappings (e.g., the frametable). */ -- 2.30.2